<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>人力资源管理系统 - 登录</title>
    <link rel="stylesheet" th:href="@{/css/style.css}">
</head>
<body>
<div class="login-container">
    <div class="login-box">
        <h1>人力资源管理系统</h1>
        <!-- 错误提示区域 -->
        <div th:if="${param.error}" class="error-message">
            <span th:text="${param.message != null} ? ${param.message} : '用户名或密码错误'"></span>
        </div>

        <!-- 登出成功提示 -->
        <div th:if="${param.logout}" class="alert alert-success" style="color: #155724; background-color: #d4edda; padding: 10px; border-radius: 4px; margin-bottom: 15px; text-align: center;">
            您已成功登出系统
        </div>
        <form th:action="@{/login}" method="post">
            <div class="form-group">
                <label>用户名</label>
                <input type="text" name="username" required>
            </div>
            <div class="form-group">
                <label>密码</label>
                <input type="password" name="password" required>
            </div>
            <button type="submit">登录</button>
        </form>
    </div>
</div>
</body>
</html>